import React, {Component} from 'react';

class Title extends Component{
  render(){
    return (
      <div className="title">
        {this.props.name}
        <span>{this.props.el.toUpperCase()}</span>
      </div>
    )
  }
}

function formatPrice(num){
  let _num = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g,',')
  return _num
}

function getUrl(){
  let url = window.location.hash
  let id = url.slice(1)
  return id
}
export {Title, formatPrice, getUrl} 